package com.love.marriage.userInfo.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.love.marriage.common.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * description:  用户表类
 * author:       mybatisPlus
 * createDate: 2024-10-11 22:04:00
 * version:      1.0.0
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("user_info_t")
@Schema(description = "用户表")
public class UserInfo extends BaseEntity<UserInfo>{

    @Schema(description = "用户名", type = "String", implementation = String.class)
    @TableField("username")
    private String username;

    @Schema(description = "密码（加密存储）", type = "String", implementation = String.class)
    @TableField("`password`")
    private String password;

    @Schema(description = "手机号码", type = "String", implementation = String.class)
    @TableField("phone")
    private String phone;

    @Schema(description = "用户编码", type = "String", implementation = String.class)
    @TableField("`code`")
    private String code;

    @Schema(description = "用户状态 (active=活跃, inactive=不活跃)", type = "String", implementation = String.class)
    @TableField("`status`")
    private String status;

    @Schema(description = "微信OpenID", type = "String", implementation = String.class)
    @TableField("wechat_openid")
    private String wechatOpenid;

    @Schema(description = "微信公众号OpenID", type = "String", implementation = String.class)
    @TableField(value = "wechat_gzh_openid", updateStrategy = FieldStrategy.IGNORED)
    private String wechatGzhOpenid;

    @Schema(description = "微信UnionID（跨平台统一标识）", type = "String", implementation = String.class)
    @TableField("wechat_unionid")
    private String wechatUnionid;

    @Schema(description = "头像id", type = "Long", implementation = Long.class)
    @TableField("avatar")
    private Long avatar;

    @Schema(description = "仅自己可见（1：是，0：否）", type = "Integer", implementation = Integer.class)
    @TableField("self")
    private Integer self;

    @Schema(description = "绑定微信账号的时间", type = "LocalDateTime", implementation = LocalDateTime.class)
    @TableField("wechat_bind_time")
    private LocalDateTime wechatBindTime;

    @Schema(description = "推荐人的用户id", type = "Long", implementation = Long.class)
    @TableField("intro_user_id")
    private Long introUserId;

    @TableField("code_num")
    @Schema(description = "编码数", type = "Integer", implementation = Integer.class)
    private Long codeNum;

    @TableField("source")
    @Schema(description = "来源", type = "Integer", implementation = Integer.class)
    private Integer source;

    @TableField("from_source")
    @Schema(description = "来源", type = "String", implementation = String.class)
    private String fromSource;

    @TableField("hidden_phone")
    @Schema(description = "是否隐藏手机号", type = "Boolean", implementation = Boolean.class)
    private Boolean hiddenPhone;

    @TableField(value = "local_im_id")
    @Schema(description = "本地im id", type = "Integer", implementation = Integer.class)
    private String localImId;
}
